<!DOCTYPE html>
<html>
<head>
	<title><%= title %></title>
	<link rel='stylesheet' href='/stylesheets/style.css'/>
</head>
<body>
<h1><%= title %></h1>
<p>EJS Welcome to <%= title %></p>
<script>
	function test() {
		$.ajax({
			cache: true,
			type: "get",
			timeout: 2000,
			url: "http://192.168.1.191:4000",
			data: {gId: "BVvT5PQnXm2hBMvF"},
			async: true,
			error: function (xhr, statusText, errorThrown) { // XMLHttpRequest
				alert("错误提示： status:" + xhr.status + " responseText:" + xhr.responseText);
			},
			success: function (result, statusText, xhr) {
				alert(result + ",statusText:" + statusText + ",status:" + xhr.status);
			},
			complete: function (xhr, statusText) { //请求完成后最终执行参数
				if (statusText == 'timeout') {//超时,status还有success,error等值的情况
					alert("超时");
				}
			}
		});
	}
</script>
</body>
</html>
